<template>
	<div>
		<el-card shadow="never">
			<!-- <h1>{{this.$router.currentRoute.name}}</h1> -->
			<el-table v-loading="loading" :data="tableData" style="width: 100%;margin-top: 20px">
				<el-table-column type="index" width="50"></el-table-column>
				<el-table-column label="商户订单号" align="center" width="300" prop="outTradeNo"></el-table-column>
				<el-table-column label="微信支付订单号" align="center" width="300" prop="transactionId"></el-table-column>
				<el-table-column label="用户标识" align="center" width="300" prop="openid"></el-table-column>
				<el-table-column label="是否关注公众号" align="center" width="180" prop="isSubscribe">
					<template scope="scope">
						<span v-if="scope.row.isSubscribe == 'Y'">是</span>
						<span v-if="scope.row.isSubscribe == 'N'">否</span>
					</template>
				</el-table-column>
				<el-table-column label="应用ID" align="center" width="300" prop="appid"></el-table-column>
				<el-table-column label="总金额" align="center" width="100" prop="totalFee"></el-table-column>
				<el-table-column label="现金支付金额" align="center" width="150" prop="cashFee"></el-table-column>
				<el-table-column label="支付完成时间" align="center" width="300" prop="timeEnd"></el-table-column>
				<el-table-column label="随机字符串" align="center" width="300" prop="nonceStr"></el-table-column>
				<el-table-column label="签名" align="center" width="300" prop=" sign"></el-table-column>
				<el-table-column label="商户号" align="center" width="200" prop="mchId"></el-table-column>
				<el-table-column label="交易类型" align="center" width="200" prop="tradeType"></el-table-column>
				<el-table-column label="付款银行" align="center" width="300" prop="bankType"></el-table-column>
				<el-table-column label="货币种类" align="center" width="200" prop="feeType"></el-table-column>
				<el-table-column label="现金支付货币类型" align="center" width="200" prop="cashFeeType"></el-table-column>
				<el-table-column label="代金券金额" align="center" width="200" prop="couponFee"></el-table-column>
				<el-table-column label="代金券使用数量" align="center" width="200" prop="couponCount"></el-table-column>
				<el-table-column label="商家数据包" align="center" width="200" prop="attach"></el-table-column>
				<el-table-column label="业务结果" align="center" width="200" prop="resultCode"></el-table-column>
				<el-table-column label="错误代码" align="center" width="200" prop="errCode"></el-table-column>
				<el-table-column label="错误代码描述" align="center" width="200" prop="errCodeDes"></el-table-column>
				<el-table-column label="返回状态码" align="center" width="200" prop="returnCode"></el-table-column>
				<el-table-column label="返回信息" align="center" width="200" prop="returnMsg"></el-table-column>
			</el-table>
			<div style="margin-top: 20px;text-align: right">
				<el-pagination
					background
					@current-change="columnFind"
					:current-page="page.page"
					:page-size="page.pagesize"
					layout="prev, pager, next, jumper, total"
					:total="page.count"
				></el-pagination>
			</div>
		</el-card>
	</div>
</template>

<script>
import { wechatPayLogList } from '../../../../server/index.js';
import Cookie from 'js-cookie';
export default {
	data() {
		return {
			tableData: [],
			page: {
				count: 0,
				pagesize: 10,
				page: 1
			},
			loading: true
		};
	},
	mounted() {
		var page = 1;
		this.columnFind(page);
		Cookie.remove('tabList');
	},
	methods: {
		columnFind(page) {
			const _this = this;
			_this.page.page = page;
			let obj = {
				keyword: '',
				page: _this.page.page,
				rows: _this.page.pagesize
			}; 
			// _this.tableData = []

			this.http.request({
				url: wechatPayLogList,
				data: obj,
				success: function(res) {
					_this.loading = false;
					_this.tableData = res.list;
					_this.page.count = res.total;
				},
				error:function(err){
					_this.$message({
						offset: '200',
						message: err.msg
					})
				}
			});
		}
	}
};
</script>

<style></style>
